<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改工单明细')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-edit" th:object="${workOrderDetail}">
            <input name="detailId" th:field="*{detailId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">工单主表id：</label>
                <div class="col-sm-8">
                    <input name="workOrderId" th:field="*{workOrderId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备id：</label>
                <div class="col-sm-8">
                    <input name="machineId" th:field="*{machineId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">bom Id：</label>
                <div class="col-sm-8">
                    <input name="bomId" th:field="*{bomId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">工序工单号：</label>
                <div class="col-sm-8">
                    <input name="processWorkOrder" th:field="*{processWorkOrder}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工序</label>
                <div class="col-sm-8">
<!--                    <input name="process" th:field="*{process}" class="form-control" type="text">-->
                    <select name="status" class="form-control m-b" th:with="type=${@dict.getType('work_process')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态</label>
                <div class="col-sm-8">
<!--                    <div class="radio-box">-->
<!--                        <input type="radio" name="status" value="">-->
<!--                        <label th:for="status" th:text="未知"></label>-->
<!--                    </div>-->
                    <select name="status" class="form-control m-b" th:with="type=${@dict.getType('work_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "workorder/detail";
        $("#form-detail-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize());
            }
        }
    </script>
</body>
</html>